package com.kaigejava.guanchazhemoshi.javaobserver;

/**
 * Created by kaigejava on 2019/8/12.
 */
public class JavaObserverWeatherMainTest {
    public static void main(String[] args) {
        CurrentConditionJava mCurrentConditions;
        ForcastConditionJava mForcastConditions;
        WeaterDataJava mWeatherData;

        mCurrentConditions=new CurrentConditionJava();
        mForcastConditions=new ForcastConditionJava();
        mWeatherData=new WeaterDataJava();

        mWeatherData.addObserver(mCurrentConditions);
        mWeatherData.addObserver(mForcastConditions);
        mWeatherData.setData(30, 150, 40);

        mWeatherData.deleteObserver(mCurrentConditions);
        mWeatherData.setData(35, 150, 60);

    }
}
